﻿using System;

namespace MathService.MathParser
{
    public abstract class ExpressionItem
    {
        public string Name { get; set; }

        public abstract double GetValue();
    }

    public class ExpressionVarabel : ExpressionItem
    {
        public double Value { get; set; }

        public override double GetValue() { return Value; }

        public ExpressionVarabel(string Name) { this.Name = Name; }

        public override string ToString() { return string.Format("{0}={1}", Name, Value); }
    }

    public class ExpressionFunction : ExpressionItem
    {
        public Delegate Delegate { get; set; }

        public override double GetValue()
        {
            throw new NotImplementedException();
        }
    }

    public class ExpressionOperator : ExpressionItem
    {
        public override double GetValue()
        {
            throw new NotImplementedException();
        }
    }
}
